<template>
	<view class="my-search-container" :style="{'background-color':bgcolor}" @click="clickMySerch">
		<view class="my-search-box" :style="{'border-radius':radius + 'px'}">
			<uni-icons type="search" size="17"></uni-icons>
			<text class="placeholder">搜索</text>
		</view>
	</view>
</template>

<script>
	export default {
		name:"my-search",
		props:{
			bgcolor:{
				type:String,
				default:'#c00000'
			},
			radius:{
				type:Number,
				default:18//px
			}
		},
		data() {
			return {
				
			};
		},
		methods:{
			clickMySerch(){
				this.$emit('click')
			}
		}
	}
</script>

<style lang="scss">
	.my-search-container{
		background-color: #c00000;
		height: 50px;
		padding: 0 15px;
		display: flex;
		align-items: center;
		.my-search-box{
			width: 100%;
			background-color: #fff;
			height: 40px;
			border-radius: 15px;
			display: flex;
			justify-content: center;
			align-items: center;
			.placeholder{
				font-size: 12px;
				margin-left: 5px;
				
			}
		}
	}
</style>